﻿namespace Ruirun.Mes.Entities
{
    /// <summary>
    /// IPN信息
    /// </summary>
    [Description("IPN信息")]
    [EntitySchema(Constants.Wms)]
    public class IPN : EntityBase<Guid>, ICreationAudited<long>
    {
        /// <summary>
        /// 物料分类
        /// </summary>
        public Guid MaterialCategoryId { get; set; }

        /// <summary>
        /// IPN号
        /// </summary>
        [StringSize(StringSizeType.General)]
        public string IpnNo { get; set; }

        /// <summary>
        /// MPN/部件型号/名称
        /// </summary>
        [Required, StringSize(StringSizeType.Name)]
        public string Name { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        [Required]
        public int Unit { get; set; }

        /// <summary>
        /// 描述/规格型号
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 生产商
        /// </summary>
        [StringSize(StringSizeType.Remark)]
        public string Manufacturer { get; set; }

        /// <summary>
        /// 存货属性
        /// </summary>
        [Required]
        public string StockAttributes { get; set; }

        /// <summary>
        /// 所属项目
        /// </summary>
        public int Project { get; set; }

        [StringSize(StringSizeType.Data)]
        public string Remark { get; set; }

        /// <summary>
        /// 获取或设置 创建者编号
        /// </summary>
        [DisplayName("创建者编号")]
        public long? CreatorId { get; set; }

        /// <summary>
        /// 获取或设置 创建时间
        /// </summary>
        [DisplayName("创建时间")]
        public DateTime CreatedTime { get; set; }

        public virtual MaterialCategory MaterialCategory { get; set; }

    }
}
